home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / ams__l~1.zoo / include / fastfont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-05  |  1.1 KB  |  48 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is part of the Atari Machine Specific Library,
  4. //  and is Copyright 1992 by Warwick W. Allison.
  5. //
  6. //  You are free to copy and modify these sources, provided you acknowledge
  7. //  the origin by retaining this notice, and adhere to the conditions
  8. //  described in the file COPYING.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11.  
  12. #ifndef FastFont_h
  13. #define FastFont_h
  14.  
  15. // 16-pixel, single plane (but still works in colour) text.
  16.  
  17. class Screen;
  18.  
  19. class FastFont {
  20. public:
  21.     FastFont(Screen& s, int w, int h, char from, char to);
  22.     FastFont(const char*);
  23.     ~FastFont();
  24.  
  25.     int operator! ();
  26.     int Save(const char*);
  27.  
  28.     void Plane(short);
  29.  
  30.     void Put(char, int& x, int y);
  31.     void Put(const char*, int& x, int y);
  32.  
  33.     short Width(char);
  34.     int Width(const char*);
  35.     void SetWidth(char,short); // Default=width of bitmap
  36.     void SetSpacing(short); // Default=1
  37.  
  38. private:
  39.     char min,max;
  40.     unsigned short** data;
  41.     unsigned short* width;
  42.     short height;
  43.     short plane;
  44.     short space;
  45. };
  46.  
  47. #endif
  48.